import { S } from '../../s';
import { IPSPanelItemGroupLogic } from './ipspanel-item-group-logic';
import { IPSPanelItemLogic } from './ipspanel-item-logic';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSPanelItemGroupLogicImpl
  extends PSModelObjectImpl
  implements IPSPanelItemGroupLogic
{
  get groupOP(): string {
    return this.M.groupOP;
  }

  get logicCat():
    | 'PANELVISIBLE'
    | 'ITEMENABLE'
    | 'ITEMBLANK'
    | 'SCRIPTCODE_CHANGE'
    | 'SCRIPTCODE_CLICK'
    | 'SCRIPTCODE_FOCUS'
    | 'SCRIPTCODE_BLUR' {
    return this.M.logicCat;
  }

  get logicType(): string {
    return this.M.logicType;
  }

  protected pspanelitemlogics: IPSPanelItemLogic[];
  getPSPanelItemLogics(): IPSPanelItemLogic[] | null {
    return (
      this.pspanelitemlogics ||
      (this.pspanelitemlogics = this.fillChildListModel(
        this.M.getPSPanelItemLogics,
        S._29a,
      ) as IPSPanelItemLogic[])
    );
  }

  findPSPanelItemLogic(objKey: any): IPSPanelItemLogic | null {
    return this.getPSModel5(
      S._29a,
      this.getPSPanelItemLogics(),
      objKey,
    ) as IPSPanelItemLogic;
  }

  get notMode(): boolean {
    return this.M.notMode;
  }
  get cls(): string {
    return 'PSPanelItemGroupLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._177) return true;
    return super.instanceof(cls);
  }
}
